package com.javaspeak.concurrency.synchronizedperformance.uncontended;

/**
 * This class has 2 ways of incrementing a counter. One is by using a
 * synchronized method and the other is using a normal method (not synchronized)
 * 
 * @author John Dickerson
 */
public class UncontendedCounter {
   
    private int countSynchronized;
    private int count;
    
    public synchronized void doSomethingUncontenedSynchronized(){
        
        countSynchronized++;
    }
    
    public void doSomething(){
        
        count++;
    }
}
